package com.mes.cloud.dto;

import com.mes.cloud.annotation.ExcelAttribute;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 组织
 *
 * @author wxm
 * @date 2019-4-16
 */
@ApiModel(value = "OrgDTO", description = "组织信息")
@Data
public class OrgDTO extends BaseDto implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @ApiModelProperty(value = "ID", dataType = "Long")
    @ExcelAttribute(name = "ID", column = "A")
    private Long id;
    /**
     * 编码
     */
    @ApiModelProperty(value = "编码", dataType = "String")
    @ExcelAttribute(name = "编码", column = "B")
    //@NotNull(message = "部门编号不能为空")
    private String code;
    /**
     * 部门名称
     */
    @ApiModelProperty(value = "部门名称", dataType = "String")
    @ExcelAttribute(name = "部门名称", column = "C")
    //@NotNull(message = "部门名称不能为空")
    private String deptName;
    /**
     * 类型
     */
    @ApiModelProperty(value = "类型", dataType = "String")
    @ExcelAttribute(name = "类型", column = "D")
    @NotNull(message = "类型不能为空")
    private String type;
    /**
     * 父ID
     */
    @ApiModelProperty(value = "父ID", dataType = "Long")
    @ExcelAttribute(name = "父ID", column = "E")
    @NotNull(message = "父ID不能为空")
    private Long parentId;

    /**
     * 国家
     */
    @ApiModelProperty(value = "国家", dataType = "String")
    @ExcelAttribute(name = "国家", column = "F")
//    @NotNull(message = "国家不能为空")
    private String country;
    /**
     * 省
     */
    @ApiModelProperty(value = "省", dataType = "String")
    @ExcelAttribute(name = "省", column = "G")
//    @NotNull(message = "省不能为空")
    private String province;
    /**
     * 市
     */
    @ApiModelProperty(value = "市", dataType = "String")
    @ExcelAttribute(name = "市", column = "H")
//    @NotNull(message = "市不能为空")
    private String city;
    /**
     * 区
     */
    @ApiModelProperty(value = "区", dataType = "String")
    @ExcelAttribute(name = "区", column = "I")
//    @NotNull(message = "区不能为空")
    private String area;
    /**
     * 街道
     */
    @ApiModelProperty(value = "街道", dataType = "String")
    @ExcelAttribute(name = "街道", column = "J")
//    @NotNull(message = "街道不能为空")
    private String street;
    /**
     * 是否启用
     */
    private String status;
    /**
     * 组织名称
     */
    @ApiModelProperty(value = "组织名称", dataType = "String")
    @ExcelAttribute(name = "组织名称", column = "K")
    private String orgName;

    /**
     *
     */
    @ApiModelProperty(value = "创建时间", dataType = "Date")
    @ExcelAttribute(name = "创建时间", column = "L")
    private Date crtdate;

    /**
     *
     */
    @ApiModelProperty(value = "修改时间", dataType = "Date")
    @ExcelAttribute(name = "修改时间", column = "M")
    private Date upddate;
    /**
     * 描述
     */
    @ApiModelProperty(value = "描述", dataType = "String")
    @ExcelAttribute(name = "描述", column = "N")
    private String remark;
    /**
     *
     */
    @ApiModelProperty(value = "是否删除：0:正常 1：删除", dataType = "Integer")
    private Integer isDelete;
    /**
     *
     */
    @ApiModelProperty(value = "是否启用：0正常/1禁用", dataType = "Integer")
    @ExcelAttribute(name = "0正常/1禁用", column = "O")
    private Integer isEnable;

    @ApiModelProperty(value = "公司ID", dataType = "String")
    @ExcelAttribute(name = "公司ID", column = "P")
    private String companyId;

    @ApiModelProperty(value = "公司名称", dataType = "String")
    @ExcelAttribute(name = "公司名称", column = "Q")
    private String companyName;

    @ApiModelProperty(value = "外部编码", dataType = "String")
    @ExcelAttribute(name = "外部编码", column = "R")
    private String besidesCode;

    @ApiModelProperty(value = "公司统一编码", dataType = "String")
    @ExcelAttribute(name = "公司统一编码", column = "S")
    private String companyCode;

    @ApiModelProperty(value = "父级编号", dataType = "String")
    @ExcelAttribute(name = "父级编号", column = "T")
    private String familyCodes;

    @ApiModelProperty(value = "成本中心", dataType = "String")
    @ExcelAttribute(name = "成本中心", column = "U")
    private String costCenter;

    @ApiModelProperty(value = "组织层级", dataType = "String")
    @ExcelAttribute(name = "组织层级", column = "V")
    private String orgHierarchy;

    @ApiModelProperty(value = "组织标识：0/虚拟 1/标准", dataType = "String")
    @ExcelAttribute(name = "组织标识：0/虚拟 1/标准", column = "W")
    private String orgSign;

    @ApiModelProperty(value = "组织类型", dataType = "String")
    @ExcelAttribute(name = "组织类型", column = "X")
    private String orgType;

    @ApiModelProperty(value = "详细地址", dataType = "String")
    @ExcelAttribute(name = "详细地址", column = "Y")
    private String address;

    @ApiModelProperty(value = "行政区划id", dataType = "Long")
    @ExcelAttribute(name = "行政区划id", column = "Z")
    private Long areaId;

    @ApiModelProperty(value = "是否有子节点", dataType = "Integer")
    private Integer isChildren;

    private List<OrgDTO> children = new ArrayList<OrgDTO>();
}
